﻿@model IEnumerable<BookStore.Models.Book>
@{
    Layout = "~/Views/Shared/_SubLayout.cshtml";
    ViewBag.Title = "Home";
}
<div class="title">
    <span class="title_icon">
        <img src="@Url.Content("~/Content/Images/bullet1.gif")" alt="" title="" /></span>Featured
    books</div>
@foreach (var item in Model)
{
    <div class="feat_prod_box">
        @{string sImageFile = string.Empty; }
        @if (File.Exists(Server.MapPath(string.Format("~/Content/Images/Book/{0}.jpg", item.BookCode))))
        {
            sImageFile = item.BookCode;
        }
        else
        {
            sImageFile = "nophoto";
        }
        <div class="prod_img">
                <a href = "@Url.Action("Detail", "Home", new { ItemID = item.ID })">
                    <img src="@Url.Content(string.Format("~/Content/Images/Book/{0}.jpg", sImageFile))" alt="" title="" border="0" height="90" width="60" /></a></div>
        <div class="prod_det_box">
            <div>
                <div class="box_top">
                </div>
                <div class="box_center">
                    <div class="prod_title">
                        @item.BookName</div>
                    <p class="details">
                        @item.Description
                    </p>
                    <div class="more">@Html.ActionLink("- more details -", "Detail", new { ItemID = item.ID })
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="box_bottom">
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>

}
